/**
 * 订单详情-列表
 * Created by wzj on 2017/4/10.
 */

function JBSFrame_purchase_list(){

	JBSFrame.call(this);

	//列表
	this.list_purchase = null;

	//初始化UI
	this.initUI = function(){

		//左侧菜单栏
		//当前选中我的采购
		ReactDOM.render(<VerticalMenu  focusItem={"我的采购"}/>,document.getElementById("component-leftMenu"));

		//详情列表
		this.list_purchase = ReactDOM.render(<PurchaseListTable />,document.getElementById("component-table"));
		//this.renderRTable("component-table")

		//绑定表格状态查询过滤
		$("#tabs-filterPurchase >li").on("click",function(evt){
			$("#tabs-filterPurchase >li").removeClass("active");
			$(evt.currentTarget).addClass("active");
			//查询值
			var filterValue = $(evt.currentTarget).data("type");
			//重新加载数据
			this.list_purchase.ajaxRequestData();
		}.bind(this));

		//绑定表格订单号或品名查询过滤
		$("#button-filterPurchase").on("click",function(evt){
			//查询值
			var filterValue = $("#input-filterPurchase").val();
			//重新加载数据
			this.list_purchase.ajaxRequestData();
		}.bind(this));
	}
}



/*
 //body load
 --------------------------------------------------------------------*/
var esteel_purchase_list;
$(document).ready(function(e) {
	esteel_purchase_list = new JBSFrame_purchase_list();
	//初始化UI
	esteel_purchase_list.initUI()
});
